/*
 * Copyright (C) 2016 alchemystar, Inc. All Rights Reserved.
 */
package com.eblly.meta;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.LinkedList;
import java.util.List;

/**
 * 索引信息
 * <p>
 * CREATE TEMPORARY TABLE `STATISTICS` (
 * `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',
 * `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
 * `TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
 * `NON_UNIQUE` bigint(1) NOT NULL DEFAULT '0',
 * `INDEX_SCHEMA` varchar(64) NOT NULL DEFAULT '',
 * `INDEX_NAME` varchar(64) NOT NULL DEFAULT '',
 * `SEQ_IN_INDEX` bigint(2) NOT NULL DEFAULT '0',
 * `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
 * `COLLATION` varchar(1) DEFAULT NULL,
 * `CARDINALITY` bigint(21) DEFAULT NULL,
 * `SUB_PART` bigint(3) DEFAULT NULL,
 * `PACKED` varchar(10) DEFAULT NULL,
 * `NULLABLE` varchar(3) NOT NULL DEFAULT '',
 * `INDEX_TYPE` varchar(16) NOT NULL DEFAULT '',
 * `COMMENT` varchar(16) DEFAULT NULL,
 * `INDEX_COMMENT` varchar(1024) NOT NULL DEFAULT ''
 * ) ENGINE=MEMORY DEFAULT CHARSET=utf8
 *
 * @Author eblly
 */
@Getter
@Setter
@ToString
@EqualsAndHashCode
public class Key {

    private List<String> columnList;
    private String indexName;

    /**
     * 0表示unique,1表示普通索引
     */
    private String notUnique;

    private String indexType;

    @Deprecated
    private String comment;
    private String indexComment;

    private int seqInIndex;

    public Key() {
        columnList = new LinkedList<>();
    }


}
